#pragma once
#include "vehicule.h"
#define size_type unsigned int
#include <stdio.h>



class List {
	//an array of pointers to Vehicle
	vehicule** list;
	
	size_type m_size;
    //Ctr on the elements that are in the vector
    size_type m_filled_in;
    //Max size of vector
    static const size_type m_max_size = 1000000;
    //size of increment when the vector is too
    //small for insertion
    static const size_type m_inc_size = 10;


	void destroy();
	void allocate( size_type );

	void resize(int n);

public:
	size_type size()		const{return this->m_filled_in;};                   
    size_type capacity()	const{return m_size;};   
    size_type max_size()	const{return m_max_size;};

	List():m_filled_in(0){allocate(100);};
	~List( ) {destroy( );};       //destructor
	void insert(const vehicule& ); // insert another vehicle
	void sort_inventory();
	// sort into order using to key_inventory()
	void print() const {for(int i=0; i<size( ); i++) {list[i]->print( ); cout<<endl;}} // print the list in its current order
	bool gt(char const* const, char const* const);
};


